Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update the LocaleService initial logic #397

Merged
merged 3 commits into from
Sep 7, 2021
Merged

fix: update the LocaleService initial logic #397

merged 3 commits into from
Sep 7, 2021

Conversation

wewoor
Copy link
Collaborator

@wewoor wewoor commented Sep 3, 2021

Description

修复在配置项中,变更 locale 后不生效的问题

Changes

  • 优化 initilaize 逻辑
  • 重构 reset 方法
  • 重构 getCurrentLocale 方法
  • 更新 单元测试文件

@wewoor wewoor self-assigned this Sep 3, 2021
@wewoor wewoor added the bug Something isn't working label Sep 3, 2021
@wewoor wewoor added this to the 0.9.0-alpha.5 milestone Sep 3, 2021
@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #397 (dc95957) into main (f99b10f) will increase coverage by 0.46%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #397      +/-   ##
==========================================
+ Coverage   80.80%   81.27%   +0.46%     
==========================================
  Files         177      177              
  Lines        4844     4848       +4     
  Branches     1044     1044              
==========================================
+ Hits         3914     3940      +26     
+ Misses        921      899      -22     
  Partials        9        9              
Impacted Files Coverage Δ
src/i18n/localeService.ts 100.00% <100.00%> (ø)
src/services/settingsService.ts 100.00% <100.00%> (ø)
src/services/theme/helper.ts 100.00% <0.00%> (ø)
src/services/theme/colorRegistry.ts 100.00% <0.00%> (ø)
src/workbench/panel/panel.tsx 100.00% <0.00%> (+15.78%) ⬆️
src/components/monaco/index.tsx 100.00% <0.00%> (+21.05%) ⬆️
.../workbench/notification/notificationPane/index.tsx 100.00% <0.00%> (+78.94%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f99b10f...dc95957. Read the comment docs.

@wewoor wewoor changed the title fix: the language reloading when the locale changed fix: remove the reset logic from the LocaleService constructor Sep 3, 2021
@wewoor wewoor changed the title fix: remove the reset logic from the LocaleService constructor fix: update the LocaleService initial logic Sep 7, 2021
@wewoor
Copy link
Collaborator Author

wewoor commented Sep 7, 2021

@ProfBramble 这条降低测试覆盖率的报告可以忽略

@ProfBramble ProfBramble self-requested a review September 7, 2021 08:41
Copy link
Contributor

@ProfBramble ProfBramble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ProfBramble ProfBramble merged commit c98df53 into main Sep 7, 2021
@ProfBramble ProfBramble deleted the fix/i18n branch September 7, 2021 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants